
 
 F u n c t i o n :   c r e a t e E l e m e n t ( s t r i n g T a g N a m e ,   a t t r i b u t e s K e y V a l u e M a p ,   s t y l e s K e y V a l u e M a p ,   s t r i n g C l a s s N a m e ,   s t r i n g O r E l e m e n t N o d e s T o I n s e r t ) 
 
 
 
 S h o r t h a n d :   c r e a t e ( s t r i n g T a g N a m e ,   a t t r i b u t e s K e y V a l u e M a p ,   s t y l e s K e y V a l u e M a p ,   s t r i n g C l a s s N a m e ,   s t r i n g O r E l e m e n t N o d e s T o I n s e r t ) 
 
 
 
 D e s c r i p t i o n :   C r e a t e s   a   D O M   e l e m e n t   w i t h   s u p p l e m e n t a l   p a r a m e t e r s . 
 
 
 
 R e t u r n s :   d o m E l e m e n t . 
 
 
 
 N o t e :   T h e   c r e a t e E l e m e n t ( )   f u n c t i o n   d o e s   n o t   s u p p o r t   c h a i n i n g . 
 
 
 
 E x a m p l e : 
 
 
 
 / /   C r e a t e   a   n e w   e l e m e n t   w i t h   t a g   n a m e . 
 
 v a r   m y E l e m e n t   =   $ A . c r e a t e E l e m e n t ( " b u t t o n " ) ; 
 
 
 
 / /   C r e a t e   a   n e w   e l e m e n t   w i t h   t a g   n a m e   p l u s   a t t r i b u t e s . 
 
 v a r   m y E l e m e n t   =   $ A . c r e a t e E l e m e n t ( " b u t t o n " ,   { 
 
     / /   A t t r i b u t e s 
 
     " a r i a - l a b e l " :   " S e t t i n g s " , 
 
     " a r i a - e x p a n d e d " :   " f a l s e " 
 
 } ) ; 
 
 
 
 / /   C r e a t e   a   n e w   e l e m e n t   w i t h   t a g   n a m e ,   a t t r i b u t e s ,   p l u s   s t y l e   p r o p e r t i e s . 
 
 v a r   m y E l e m e n t   =   $ A . c r e a t e E l e m e n t ( " b u t t o n " ,   { 
 
     / /   A t t r i b u t e s 
 
     " a r i a - l a b e l " :   " S e t t i n g s " , 
 
     " a r i a - e x p a n d e d " :   " f a l s e " 
 
 } ,   { 
 
     / /   S t y l e s 
 
     p o s i t i o n :   " a b s o l u t e " , 
 
     " m a r g i n - l e f t " :   - 5 0 p x 
 
 } ) ; 
 
 
 
 / /   C r e a t e   a   n e w   e l e m e n t   w i t h   t a g   n a m e ,   a t t r i b u t e s ,   s t y l e   p r o p e r t i e s ,   p l u s s   c l a s s   n a m e s . 
 
 v a r   m y E l e m e n t   =   $ A . c r e a t e E l e m e n t ( " b u t t o n " ,   { 
 
     / /   A t t r i b u t e s 
 
     " a r i a - l a b e l " :   " S e t t i n g s " , 
 
     " a r i a - e x p a n d e d " :   " f a l s e " 
 
 } ,   { 
 
     / /   S t y l e s 
 
     p o s i t i o n :   " a b s o l u t e " , 
 
     " m a r g i n - l e f t " :   - 5 0 p x 
 
 } , 
 
 / /   C l a s s   N a m e s 
 
 " a c c o r d i o n   h e a d i n g " ) ; 
 
 
 
 / /   C r e a t e   a   n e w   e l e m e n t   w i t h   t a g   n a m e ,   a t t r i b u t e s ,   s t y l e   p r o p e r t i e s ,   c l a s s   n a m e s ,   p l u s   c o n t e n t . 
 
 v a r   m y E l e m e n t   =   $ A . c r e a t e E l e m e n t ( " b u t t o n " ,   { 
 
     / /   A t t r i b u t e s 
 
     " a r i a - l a b e l " :   " S e t t i n g s " , 
 
     " a r i a - e x p a n d e d " :   " f a l s e " 
 
 } ,   { 
 
     / /   S t y l e s 
 
     p o s i t i o n :   " a b s o l u t e " , 
 
     " m a r g i n - l e f t " :   - 5 0 p x 
 
 } , 
 
 / /   C l a s s   N a m e s 
 
 " a c c o r d i o n   h e a d i n g " , 
 
 / /   C o n t e n t 
 
 ' < s p a n   c l a s s = " a r r o w - i c o n " > < / s p a n > ' ) ; 
 
 